﻿@model VideoCache.Server.MVCWeb.Areas.Admin.Models.SiteModel

@{
    ViewBag.Title = "修改站点";
    Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
}
@section script
{
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
}

<h2 class="pageTitle">@ViewBag.Title</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    @Html.HiddenFor(model => model.Id)
<table class="table-form">
<tr>
    <td class="must">*</td>
    <td class="label">@Html.LabelFor(model => model.Name)</td>
    <td>
        @Html.EditorFor(model => model.Name)
        @Html.ValidationMessageFor(model => model.Name)
    </td>
</tr>
<tr>
    <td class="must">*</td>
    <td class="label">@Html.LabelFor(model => model.DisplayName)</td>
    <td>
        @Html.EditorFor(model => model.DisplayName)
        @Html.ValidationMessageFor(model => model.DisplayName)
    </td>
</tr>
<tr>
    <td class="must">*</td>
    <td class="label">@Html.LabelFor(model => model.UrlHost)</td>
    <td>
        @Html.EditorFor(model => model.UrlHost)
        @Html.ValidationMessageFor(model => model.UrlHost)
    </td>
</tr>
<tr>
    <td class="must"></td>
    <td class="label">@Html.LabelFor(model => model.AllowDownload)</td>
    <td>
        @Html.EditorFor(model => model.AllowDownload)
        @Html.ValidationMessageFor(model => model.AllowDownload)
    </td>
</tr>
<tr>
    <td class="must"></td>
    <td class="label">@Html.LabelFor(model => model.Downloader)</td>
    <td>
        @Html.EditorFor(model => model.Downloader)
        @Html.ValidationMessageFor(model => model.Downloader)
    </td>
</tr>
<tr>
    <td class="must"></td>
    <td class="label">@Html.LabelFor(model => model.PlayerId)</td>
    <td>
        @Html.EditorFor(model => model.PlayerId)
        @Html.ValidationMessageFor(model => model.PlayerId)
    </td>
</tr>
<tr>
    <td class="must"></td>
    <td class="label">@Html.LabelFor(model => model.PositionTag)</td>
    <td>
        @Html.EditorFor(model => model.PositionTag)
        @Html.ValidationMessageFor(model => model.PositionTag)
    </td>
</tr>
<tr>
    <td class="must"></td>
    <td class="label"></td>
    <td>
        <button type="submit">保存</button>
        <a href="@Url.Action("Index")" class="lbtn">返回</a>
    </td>
</tr>
</table>
}